API: gdk: Remove gdk_display_set_device_hooks()
authorBenjamin Otte <otte@redhat.com>
Mon, 3 Jan 2011 15:49:13 +0000 (16:49 +0100)
committerBenjamin Otte <otte@redhat.com>
Mon, 3 Jan 2011 15:51:38 +0000 (16:51 +0100)
There's no usecase for them, so remove them before we have to commit to
keeping an API.

Make the hooks private for now, actually removing them will come in
followup patches.

docs/reference/gdk/gdk3-sections.txt
gdk/gdk.symbols
gdk/gdkdisplay.c
gdk/gdkdisplay.h
gdk/gdkdisplayprivate.h

index ec5128ecb7b64be61e97f1e8f858bedb81eb77ac..459c1c242c22d8885f544941b388490d54b37d95 100644 (file)
@@ -126,8 +126,6 @@ gdk_display_set_double_click_distance
 gdk_display_get_pointer
 gdk_display_list_devices
 gdk_display_get_window_at_pointer
-GdkDisplayDeviceHooks
-gdk_display_set_device_hooks
 gdk_display_warp_pointer
 gdk_display_supports_cursor_color
 gdk_display_supports_cursor_alpha
index 5f5fa668a867d6e553233507d0f647c3da704ce6..9fb4b631495e7cebdf1ada876bd67c44b610e554 100644 (file)
@@ -116,7 +116,6 @@ gdk_display_pointer_is_grabbed
 gdk_display_pointer_ungrab
 gdk_display_put_event
 gdk_display_request_selection_notification
-gdk_display_set_device_hooks
 gdk_display_set_double_click_distance
 gdk_display_set_double_click_time
 gdk_display_store_clipboard
index b83f1009a0a74768f619aadf48fe3e9594877522..71bc00e76a20e90677b1c6b21a60fe507aa13fdd 100644 (file)
@@ -619,37 +619,6 @@ _gdk_display_enable_motion_hints (GdkDisplay *display,
     }
 }
 
-/**
- * gdk_display_set_device_hooks:
- * @display: a #GdkDisplay.
- * @new_hooks: (allow-none): a table of pointers to functions for getting quantities related
- *             to all devices position, or %NULL to restore the default table.
- *
- * This function allows for hooking into the operation of getting the current location of any
- * #GdkDevice on a particular #GdkDisplay. This is only useful for such low-level tools as
- * an event recorder. Applications should never have any reason to use this facility.
- *
- * Returns: (transfer none): The previous device hook table.
- *
- * Since: 3.0
- **/
-GdkDisplayDeviceHooks *
-gdk_display_set_device_hooks (GdkDisplay                  *display,
-                              const GdkDisplayDeviceHooks *new_hooks)
-{
-  const GdkDisplayDeviceHooks *result;
-
-  g_return_val_if_fail (GDK_IS_DISPLAY (display), NULL);
-  result = display->device_hooks;
-
-  if (new_hooks)
-    display->device_hooks = new_hooks;
-  else
-    display->device_hooks = &default_device_hooks;
-
-  return (GdkDisplayDeviceHooks *) result;
-}
-
 /**
  * gdk_display_get_pointer:
  * @display: a #GdkDisplay
index 1b320d0afa9d64fd42e9ef71ac3350918aaa14e8..af779096c81013b234d0e013dd2e70d16f9c6d8a 100644 (file)
@@ -41,46 +41,6 @@ G_BEGIN_DECLS
 #define GDK_DISPLAY_OBJECT(object)    GDK_DISPLAY(object)
 #endif
 
-typedef struct _GdkDisplayDeviceHooks GdkDisplayDeviceHooks;
-
-/**
- * GdkDisplayDeviceHooks:
- * @get_device_state: Obtains the current position and modifier state for
- * @device. The position is given in coordinates relative to the window
- * containing the pointer, which is returned in @window.
- * @window_get_device_position: Obtains the window underneath the device
- * position. Current device position and modifier state are returned in
- * @x, @y and @mask. The position is given in coordinates relative to
- * @window.
- * @window_at_device_position: Obtains the window underneath the device
- * position, returning the location of that window in @win_x, @win_y.
- * Returns %NULL if the window under the mouse pointer is not known to
- * GDK (for example, belongs to another application).
- *
- * A table of pointers to functions for getting quantities related to
- * the current device position. Each #GdkDisplay has a table of this type,
- * which can be set using gdk_display_set_device_hooks().
- */
-struct _GdkDisplayDeviceHooks
-{
-  void (* get_device_state)                  (GdkDisplay       *display,
-                                              GdkDevice        *device,
-                                              GdkScreen       **screen,
-                                              gint             *x,
-                                              gint             *y,
-                                              GdkModifierType  *mask);
-  GdkWindow * (* window_get_device_position) (GdkDisplay      *display,
-                                              GdkDevice       *device,
-                                              GdkWindow       *window,
-                                              gint            *x,
-                                              gint            *y,
-                                              GdkModifierType *mask);
-  GdkWindow * (* window_at_device_position)  (GdkDisplay *display,
-                                              GdkDevice  *device,
-                                              gint       *win_x,
-                                              gint       *win_y);
-};
-
 GType       gdk_display_get_type (void) G_GNUC_CONST;
 GdkDisplay *gdk_display_open                (const gchar *display_name);
 
@@ -149,9 +109,6 @@ void             gdk_display_warp_pointer          (GdkDisplay             *disp
 #endif /* GDK_DISABLE_DEPRECATED */
 #endif /* GDK_MULTIDEVICE_SAFE */
 
-GdkDisplayDeviceHooks *gdk_display_set_device_hooks (GdkDisplay                  *display,
-                                                     const GdkDisplayDeviceHooks *new_hooks);
-
 GdkDisplay *gdk_display_open_default_libgtk_only (void);
 
 gboolean gdk_display_supports_cursor_alpha     (GdkDisplay    *display);
index 2662eee7b30eba88db2704639938bc462b85a185..ceea86bb8c1636c09b8936ef82257c9458d6379b 100644 (file)
@@ -31,6 +31,28 @@ G_BEGIN_DECLS
 #define GDK_DISPLAY_GET_CLASS(obj)    (G_TYPE_INSTANCE_GET_CLASS ((obj), GDK_TYPE_DISPLAY, GdkDisplayClass))
 
 
+typedef struct _GdkDisplayDeviceHooks GdkDisplayDeviceHooks;
+
+struct _GdkDisplayDeviceHooks
+{
+  void (* get_device_state)                  (GdkDisplay       *display,
+                                              GdkDevice        *device,
+                                              GdkScreen       **screen,
+                                              gint             *x,
+                                              gint             *y,
+                                              GdkModifierType  *mask);
+  GdkWindow * (* window_get_device_position) (GdkDisplay      *display,
+                                              GdkDevice       *device,
+                                              GdkWindow       *window,
+                                              gint            *x,
+                                              gint            *y,
+                                              GdkModifierType *mask);
+  GdkWindow * (* window_at_device_position)  (GdkDisplay *display,
+                                              GdkDevice  *device,
+                                              gint       *win_x,
+                                              gint       *win_y);
+};
+
 typedef struct _GdkDisplayClass GdkDisplayClass;
 
 /* Tracks information about the keyboard grab on this display */